Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finish photometry notebooks #381

Merged
merged 24 commits into from
Jul 24, 2024

Conversation

mwcraig
Copy link
Contributor

@mwcraig mwcraig commented Jul 5, 2024

This pull requests finishes off the notebooks needed to perform photometry in 2.0.

Still to do:

  • Ensure coverage on new code is 100%
  • Add new notebooks to launcher
  • Check for an intermittent error when starting notebooks from the launcher. Some times jupyter lab gets very confused and can't display widgets. Hoping this was just a one-time thing.

NOTE:

Copy link

codecov bot commented Jul 5, 2024

Codecov Report

Attention: Patch coverage is 67.88991% with 35 lines in your changes missing coverage. Please review.

Project coverage is 52.12%. Comparing base (f31ec85) to head (65f4e5b).
Report is 254 commits behind head on main.

Files with missing lines Patch % Lines
...llarphot/gui_tools/tests/test_profile_and_comps.py 0.00% 29 Missing ⚠️
...rphot/gui_tools/tests/test_comparison_functions.py 0.00% 5 Missing ⚠️
stellarphot/gui_tools/__init__.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #381       +/-   ##
===========================================
- Coverage   78.49%   52.12%   -26.38%     
===========================================
  Files          27       56       +29     
  Lines        3758     5815     +2057     
===========================================
+ Hits         2950     3031       +81     
- Misses        808     2784     +1976     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mwcraig mwcraig force-pushed the finsih-photometry-notebooks branch from 5ada920 to 8bdd8c6 Compare July 5, 2024 15:27
@mwcraig mwcraig requested a review from JuanCab July 8, 2024 15:19
JuanCab
JuanCab previously approved these changes Jul 14, 2024
Copy link
Contributor

@JuanCab JuanCab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only checked commit 85b87d forward, since others covered with PR #371 . No showstoppers but check the feedback. I didn't actually RUN the notebooks yet since this is a draft. I will if you want me to check everything.

ignore-words.txt Outdated
@@ -2,3 +2,4 @@ TOI
toi
LIVETIME
lightyear
fo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You want to be able to use two-letter variable names? :)

pyproject.toml Show resolved Hide resolved
stellarphot/notebooks/run-launcher.ipynb Outdated Show resolved Hide resolved
stellarphot/settings/custom_widgets.py Outdated Show resolved Hide resolved
stellarphot/settings/custom_widgets.py Outdated Show resolved Hide resolved
stellarphot/settings/tests/test_photometry_runner.py Outdated Show resolved Hide resolved
stellarphot/settings/tests/test_photometry_runner.py Outdated Show resolved Hide resolved
@mwcraig mwcraig force-pushed the finsih-photometry-notebooks branch 3 times, most recently from 8daeb9a to 96ac58e Compare July 19, 2024 00:35
@mwcraig mwcraig marked this pull request as ready for review July 23, 2024 17:11
@mwcraig mwcraig requested a review from JuanCab July 23, 2024 17:11
@mwcraig mwcraig force-pushed the finsih-photometry-notebooks branch from 6607656 to 65f4e5b Compare July 23, 2024 17:34
@mwcraig
Copy link
Contributor Author

mwcraig commented Jul 23, 2024

@JuanCab -- this is ready for a look. Sorry it got a little long. Once this is merged it will be possible to perform photometry via notebooks.

I'll work on a separate PR to add some more documentation and another to make the command line approach is fairly straightforward.

I'm not sure why coverage thinks we need to test our test files....

Copy link
Contributor

@JuanCab JuanCab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only reviewed commit 41416b3 (WIP photometry run settings) forward... and that is enough (24 commits)!

Most of the comments have to deal with the fact that Codecov was really freaking out demanding tests of tests and missing code that was getting tested. A few of the comments are more question/informational. No showstoppers and the tests look good.

from .photometry_widget_functions import *
from .profile_and_comps import *
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As near as I can tell this warning about code coverage is in error! You test these functions with gui_tools/tests/test_profile_and_comps.py. Not sure why it is failing. Possibly because you import ComparisonAndSeeing instead of profile_and_comps (yes, they are equivalent, but I don't know if Codecov knows that).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, Codecov is complaining that the tests are not covered by tests? Is it trying for "Inception"?

The new test itself looks fine.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, looks like Codecov is trying out for "Inception 2: The Test Never Stop" by asking for tests of test. Weird behavior. Furthermore, this tests the code that Codecov earlier claimed was not getting tested (line 5 of stellarphot/gui_tools/__init__.py).


class TestComparisonAndSeeing:
def copy_fits_to_temp(self, tmp_path):
# Copy a fits file to a temporary directory
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this just testing you can write the FITS file to the temporary directory? I assume as much, but goal of test wasn't clear from comments.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a test, it just takes care of copying the FITS file needed for a couple of the other tests in the class

@mwcraig mwcraig merged commit 543b7f8 into feder-observatory:main Jul 24, 2024
10 of 12 checks passed
@mwcraig mwcraig deleted the finsih-photometry-notebooks branch July 24, 2024 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants